package com.lzq.course.business.controller.web;

import com.lzq.course.server.dto.CategoryDto;
import com.lzq.course.server.dto.PageDto;
import com.lzq.course.server.dto.ResponseDto;
import com.lzq.course.server.service.CategoryService;
import com.lzq.course.server.util.ValidatorUtil;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController("webCategoryController")
@RequestMapping("/web/category")
public class CategoryController {

    public static final String BUSINESS_NAME = "分类";

    @Resource
    private CategoryService categoryService;

    /**
     * 查询所有 分类
     * @return
     */
    @PostMapping("/all")
    public ResponseDto all() {
        ResponseDto responseDto = categoryService.all();

        return responseDto;
    }

}
